import service from "@/api/index.js";

const collectApi = {
    // 收藏
    insert(goodsId) {
        return service.post(`/collect/${goodsId}`)
    },
    delete(id) {
        return service.delete(`/collect/${id}`);
    },
    selectByGoodsIdAndUserId(goodsId) {
        return service.get(`/collect/${goodsId}`)
    },
    selectByUserId(pageNum, pageSize) {
        return service.get("/collect/selectByUserId", {
            params: {
                pageNum: pageNum,
                pageSize: pageSize
            }
        })
    }
};
export default collectApi;